home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / pdcurs21 / flexos / _16bitmo.c next >
C/C++ Source or Header  |  1993-06-18  |  1KB  |  53 lines

  1. #define    CURSES_LIBRARY    1
  2. #include <curses.h>
  3.  
  4. #ifndef    NDEBUG
  5. char *rcsid__16bitmo = "$Header: C:\CURSES\flexos\RCS\_16bitmo.c 2.1 1993/06/18 20:23:58 MH Rel MH $";
  6. #endif
  7.  
  8.  
  9.  
  10.  
  11. #ifdef    FLEXOS
  12. /*man-start*********************************************************************
  13.  
  14.   _flexos_16bitmode()    - Puts console 16 bit mode.
  15.  
  16.   PDCurses Description:
  17.      This routine sets 16 bit mode (8 bit character +
  18.      8 bit attribute) for Flexos.
  19.  
  20.   PDCurses Return Value:
  21.      This function returns OK on success and ERR on error.
  22.  
  23.   PDCurses Errors:
  24.      Under FLEXOS, an ERR will be returned if the s_get() call
  25.      fails, or if the s_set() call fails.  You are referred to
  26.      the Flexos Programmer's Reference Guide for details on the
  27.      actual error.
  28.  
  29.   Portability:
  30.      PDCurses    int _flexos_16bitmode( void );
  31.  
  32. **man-end**********************************************************************/
  33.  
  34. int    _flexos_16bitmode(void)
  35. {
  36. extern    VIRCON    vir;        /* Allocate a Virtual Console Structure */
  37.  
  38.     retcode = s_get(T_VIRCON, 0L, (char *) &vir, (long) sizeof(vir));
  39.     if (retcode < 0L)
  40.         return( ERR );
  41.  
  42.     vir.vc_kbmode = vir.vc_kbmode | (VCKM_NABORT | VCKM_NSTOP |
  43.                      VCKM_NXLAT  | VCKM_NESC  |
  44.                      VCKM_16BIT  | VCKM_NECHO |
  45.                      VCKM_NEOF);
  46.  
  47.     vir.vc_smode = vir.vc_smode | VCSM_16BIT;
  48.  
  49.     retcode = s_set(T_VIRCON, 0L, (char *) &vir, (long) sizeof(vir));
  50.     return( (retcode < 0L) ? ERR : OK );
  51. }
  52. #endif
  53.